<?php

/**
 * @property string $id
 * @property string $com_id
 * @property string $sms_user
 * @property string $sms_pwd
 * @property string $channel
 * @property string $sign
 * @property string $create_time
 * @property string $modify_time
 * @property integer $active
 * @author lovebing <lovebing365@126.com> Created on 2014-10-2 12:07:39
 */
class SystemSms extends MainActiveRecord {

    /**
     * @return string the associated database table name
     */
    public function tableName() {
        return 'system_sms';
    }

    /**
     * Returns the static model of the specified AR class.
     * Please note that you should have this exact method in all your CActiveRecord descendants!
     * @param string $className active record class name.
     * @return SystemSms the static model class
     */
    public static function model($className = __CLASS__) {
        return parent::model($className);
    }

    public static function findActiveModel($comId = 0, $channel = 0) {
        return self::model()->find("com_id = {$comId} and channel = {$channel} and active=1");
    }

}
